//package cn.tqfeiyang.smartadmin.business.organization.controller;
//
//import cn.tqfeiyang.smartadmin.business.organization.service.PositionCurdService;
//import cn.tqfeiyang.smartadmin.business.organization.request.PositionCreateDTO;
//import cn.tqfeiyang.smartadmin.business.organization.request.PositionUpdateDTO;
//import cn.tqfeiyang.smartadmin.business.organization.request.PositionQueryDTO;
//import cn.tqfeiyang.smartadmin.business.organization.response.PositionQueryVO;
//import cn.tqfeiyang.smartadmin.business.organization.response.PositionDetailVO;
//import jakarta.annotation.Resource;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.validation.annotation.Validated;
//import cn.dev33.satoken.annotation.SaCheckPermission;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import cn.tqfeiyang.smartadmin.commons.pagination.PageData;
//import cn.tqfeiyang.smartadmin.commons.response.ApiResult;
//import cn.tqfeiyang.smartadmin.commons.validation.EntityId;
//import cn.tqfeiyang.smartadmin.commons.logging.OperationLog;
//
//import java.util.List;
//import java.util.Set;
//
///**
// * 职务CURD控制器
// *
// * @author tqfeiyang
// * @since 2024-09-30
// */
//@RestController
//@Validated
//@RequestMapping("/api/business/organization/position")
//@Tag(name = "组织/职务")
//public class PositionCurdController {
//
//    /**
//     * 职务CURD服务
//     */
//    @Resource
//    private PositionCurdService positionCurdService;
//
//    /**
//     * 分页查询职务
//     */
//    @OperationLog
//    @GetMapping("/getPositionPage")
//    @Operation(summary = "职务 - 分页查询")
//    @SaCheckPermission("business:organization:position:getPositionPage")
//    public ApiResult<PageData<PositionQueryVO>> getPositionPage(@Validated PositionQueryDTO dto) {
//        return ApiResult.success(positionCurdService.getPositionPage(dto));
//    }
//
//    /**
//     * 查询职务列表
//     */
//    @OperationLog
//    @GetMapping("/getPositionList")
//    @Operation(summary = "职务 - 查询列表")
//    @SaCheckPermission("business:organization:position:getPositionList")
//    public ApiResult<List<PositionQueryVO>> getPositionList(@Validated PositionQueryDTO dto) {
//        return ApiResult.success(positionCurdService.getPositionList(dto));
//    }
//
//    /**
//     * 查询职务详情
//     */
//    @OperationLog
//    @GetMapping("/getPositionInfo/{positionId}")
//    @Operation(summary = "职务 - 查询详情")
//    @SaCheckPermission("business:organization:position:getPositionInfo")
//    public ApiResult<PositionDetailVO> getPositionInfo(@PathVariable @EntityId Long positionId) {
//        return ApiResult.success(positionCurdService.getPositionInfo(positionId));
//    }
//
//    /**
//     * 添加职务
//     */
//    @OperationLog
//    @PostMapping("/createPosition")
//    @Operation(summary = "职务 - 添加职务")
//    @SaCheckPermission("business:organization:position:createPosition")
//    public ApiResult<PositionDetailVO> createPosition(@RequestBody @Validated PositionCreateDTO dto) {
//        Long positionId = positionCurdService.createPosition(dto);
//        return ApiResult.success(positionCurdService.getPositionInfo(positionId));
//    }
//
//    /**
//     * 修改职务
//     */
//    @OperationLog
//    @PostMapping("/updatePosition/{positionId}")
//    @Operation(summary = "职务 - 修改职务")
//    @SaCheckPermission("business:organization:position:updatePosition")
//    public ApiResult<PositionDetailVO> updatePosition(@PathVariable @EntityId Long positionId, @RequestBody @Validated PositionUpdateDTO dto) {
//        positionCurdService.updatePosition(positionId, dto);
//        return ApiResult.success(positionCurdService.getPositionInfo(positionId));
//    }
//
//    /**
//     * 删除职务
//     */
//    @OperationLog
//    @PostMapping("/deletePosition/{positionId}")
//    @Operation(summary = "职务 - 删除职务")
//    @SaCheckPermission("business:organization:position:deletePosition")
//    public ApiResult deletePosition(@PathVariable @EntityId Long positionId) {
//        positionCurdService.deletePosition(positionId);
//        return ApiResult.success();
//    }
//
//    /**
//     * 批量删除职务
//     */
//    @OperationLog
//    @PostMapping("/batchDeletePositions")
//    @Operation(summary = "职务 - 批量删除")
//    @SaCheckPermission("business:organization:position:batchDeletePositions")
//    public ApiResult batchDeletePositions(@RequestBody Set<Long> positionIds) {
//        positionCurdService.batchDeletePositions(positionIds);
//        return ApiResult.success();
//    }
//}
